package com.itany.corejava.day09;

public class SeasonB {

    public static final SeasonB SPRING=new SeasonB(1);
    public static final SeasonB SUMMER=new SeasonB(2);
    public static final SeasonB AUTUMN=new SeasonB(3);
    public static final SeasonB WINTER=new SeasonB(4);
    private int value;

    private SeasonB(int value){
        this.value=value;
    }

    @Override
    public String toString() {
        switch (this.value) {
            case 1:
                return "春天";
            case 2:
                return "夏天";
            case 3:
                return "秋天";
            case 4:
                return "冬天";
        }
        return null;
    }
}
